package com.ruoyi.datastatistics.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseDO;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 实时数据采集（小）对象 t_realtimegatherdata_xb
 *
 * @author ruoyi
 * @date 2023-09-07
 */
@Data
@TableName("t_realtimegatherdata_xb")
public class RealtimegatherdataXb extends BaseDO {
    private static final long serialVersionUID = 1L;

    /**
     * 平台表单自增主键
     */
    @TableId
    private Long id;

    /**
     * 用户归属水司
     */
    @TableField("tenant_id")
    private String tenantId;

    @TableField(exist = false)
    @Excel(name = "用户名称")
    private String userName;

    @TableField(exist = false)
    @Excel(name = "用户编号")
    private String userId;

    /**
     * 设备编号
     */
    @Excel(name = "设备编号")
    @TableField("terminal_id")
    private String terminalId;


    @Excel(name = "用户通讯地址")
    @TableField(exist = false)
    private String userAddress;

    @TableField(exist = false)
    private String communicateAddress;

    /**
     * 水表读数
     */
    @Excel(name = "水表读数")
    @TableField("total_flow")
    private BigDecimal totalFlow;

    /**
     * 终端电压
     */
    @Excel(name = "终端电压")
    @TableField("terminal_vol")
    private BigDecimal terminalVol;

    /**
     * 终端电压
     */
    @Excel(name = "信号强度")
    @TableField("terminal_csq")
    private Integer terminalCsq;

    /**
     * 阀门状态
     */
    @Excel(name = "阀门状态", readConverterExp = "0=关,1=开")
    @TableField("valve_state")
    private BigDecimal valveState;

    /**
     * 抄表时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "抄表时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField("read_date")
    private Date readDate;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private Date createTime;

    @TableField(exist = false)
    private String belongDepartment;

    @TableField(exist = false)
//    @Excel(name = "门牌号")
    private String installAddress;


    @TableField(exist = false)
    private Integer loginUserId;

    @TableField(exist = false)
    private Integer systemFlag;

    @TableField(exist = false)
    private String sheetsCode;

    @TableField("location_nb")
    private String locationNb;

    @TableField(exist = false)
    private Integer signPlatform;

    @TableField(exist = false)
    private String imei;
}
